<%-- 
    Document   : DMatrimonio
    Created on : 07-oct-2013, 16:07:42
    Author     : WALDIR
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="/RegCivil/css/estilos.css">
        <script type="text/javascript" src="/RegCivil/datepicker/jquery-1.9.1.js"></script>
        <script type="text/javascript" src="/RegCivil/datepicker/jquery-ui-1.10.3.custom.min.js"></script>
        <title></title>
        <script type="text/javascript">
            if (window.ActiveXObject) {
                var obj = new ActiveXObject("Microsoft.XMLHTTP");
            }
            if (window.XMLHttpRequest) {
                var obj = new XMLHttpRequest();
            }
            
            function buscar()
            {
                $("#contBusqueda").show();
                var nombre1 = document.getElementById("np1").value;
                var pap1 = document.getElementById("pap1").value;
                var sap1 = document.getElementById("sap1").value;

                var nombre2 = document.getElementById("np2").value;
                var pap2 = document.getElementById("pap2").value;
                var sap2 = document.getElementById("sap2").value;

                var testigo1 = document.getElementById("nt1").value;
                var pat1 = document.getElementById("pat1").value;
                var sat1 = document.getElementById("sat1").value;

                var testigo2 = document.getElementById("nt2").value;
                var pat2 = document.getElementById("pat2").value;
                var sat2 = document.getElementById("sat2").value;

                var registrador = document.getElementById("nr").value;
                var paregistrador = document.getElementById("par").value;
                var saregistrador = document.getElementById("sar").value;

                // var ubigeoM = dem + prm + dim + otm;
                var bt = document.getElementById("boton").value;
                var txt = "btn1=" + bt + "&NP1=" + nombre1 + "&NP2=" + nombre2 + "&NT1=" + testigo1 + "&NT2=" + testigo2 + "&NR=" + registrador + "&PAP1=" + pap1 + "&SAP1=" + sap1 + "&PAP2=" + pap2 + "&SAP2=" + sap2 + "&PAT1=" + pat1 + "&SAT1=" + sat1 + "&PAT2=" + pat2 + "&SAT2=" + sat2 + "&PAR=" + paregistrador + "&SAR=" + saregistrador;
                obj.onreadystatechange = res_bus;
                obj.open("post", "${pageContext.request.contextPath}/DetallesMatrimonio", true);
                obj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                obj.send(txt);
            }
            function res_bus() {
                if (obj.readyState == 4)
                {
                    var x = obj.responseText;
                    $("#RSBus").html(x);
                }
            }
            function vernumero()
            {
                   //
                   //
            }
            /* function filtrar()
             {
             var x = document.getElementById("VBus").value;
             if (x == "nroActa")
             {
             document.getElementById("boton").setAttribute("value", "ActaPersonal");
             }
             if (x == "nroActaM")
             {
             document.getElementById("boton").setAttribute("value", "ActaMatrimonial");
             }
             if (x == "idUbi")
             {
             document.getElementById("boton").setAttribute("value", "Ubigeo");
             }
             if (x == "idUbiM")
             {
             document.getElementById("boton").setAttribute("value", "UbigeoMatrimonial");
             }
             }*/
            $(document).ready(function() {
                $("#contBusqueda").hide();
            });
        </script>
    </head>
    <body>
        <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin-top:20px;width: 900px;text-align: center;" class="contacto">
            <tr><td>   
                    <fieldset style="alignment-baseline: central;margin-left: auto;margin-right: auto;" >
                        <legend style="border: 1px solid #dce0e3;background-color: #edf1f5">
                            BUSQUEDA DE MATRIMONIO</legend>
                        <table border="0">
                            <tr>
                                <td>
                                    <fieldset style="width:800px;margin-left: auto;margin-right: auto;"><legend style="font-weight: bold;">BUSQUEDA</legend>
                                        <table border="0">
                                            <tr>
                                                <td><label style="width:100px;text-align: right;padding-right: 10px;"/>Forma De Buqueda </td>
                                                <td><select name="bus"  id="VBus" style="padding: 7px 6px;
                                                            width: 150px;
                                                            border: 1px solid #CED5D7;
                                                            resize: none;
                                                            box-shadow:0 0 0 3px #EEF5F7;
                                                            margin: 5px 0;
                                                            text-transform: uppercase;"  >
                                                        <option value="nroActa" selected>NRO_ACTA_PERS</option>
                                                        <option value="nroActaM">NRO_ACTA_MAT</option>
                                                        <option value="idUbiM">IDUBIGEO_MAT</option>
                                                        <option value="idUbi">IDUBIGEO</option>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><label style="width:100px;text-align: right;padding-right: 10px;"/>Nombre Persona 1 </td>
                                                <td><input type='text' name='NP1' id='np1' style='width:100px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;"/>Apellido 1 </td>
                                                <td><input type='text' name='PAP1' id='pap1' style='width:150px;'></td> 
                                                <td><label style="text-align: right;padding-right: 10px;"/>Apellido 2 </td>
                                                <td><input type='text' name='SAP1' id='sap1' style='width:150px;'></td> 
                                            </tr> 
                                            <tr>  
                                                <td><label style="width:100px;text-align: right;padding-right: 10px;" />Nombre Persona 2 </td>
                                                <td><input type='text' name='NP2' id='np2' style='width:100px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;" />Apellido 1 </td>
                                                <td><input type='text' name='PAP2' id='pap2' style='width:150px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;" />Apellido 2 </td>
                                                <td><input type='text' name='SAP2' id='sap2' style='width:150px;'></td>
                                            </tr> 
                                            <tr>
                                                <td><label style="width:100px;text-align: right;padding-right: 10px;" />Nombre Testigo 1</td>
                                                <td><input type='text' name='NT1' id='nt1' style='width:100px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;" />Apellido 1</td>
                                                <td><input type='text' name='PAT1' id='pat1' style='width:150px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;" />Apellido 2</td>
                                                <td><input type='text' name='SAT1' id='sat1' style='width:150px;'></td>
                                            </tr> 
                                            <tr>
                                                <td><label style="width:100px;text-align: right;padding-right: 10px;" />Nombre Testigo 2</td>
                                                <td><input type='text' name='NT2' id='nt2' style='width:100px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;" />Apellido 1</td>
                                                <td><input type='text' name='PAT2' id='pat2' style='width:150px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;" />Apellido 2</td>
                                                <td><input type='text' name='SAT2' id='sat2' style='width:150px;'></td>
                                            </tr> 
                                            <tr>
                                                <td><label style="width:100px;text-align: right;padding-right: 10px;" />Nombre Registrador</td>
                                                <td><input type='text' name='NR' id='nr' style='width:100px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;" />Apellido 1</td>
                                                <td><input type='text' name='PAR' id='par' style='width:150px;'></td>
                                                <td><label style="text-align: right;padding-right: 10px;" />Apellido 2</td>
                                                <td><input type='text' name='SAR' id='sar' style='width:150px;'></td>
                                            </tr> 
                                        </table>
                                    </fieldset>
                                </td>
                            </tr>
                            <tr >
                                <td colspan="4" style="text-align: center;"><button type="button" name="btn1" id="boton" value="busqueda"  class="boton" style="width: 500px;" onclick="buscar()">Bucar</button></td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
        </table>
        <form method="post">
            <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin-top:20px;width: 950px;padding-top: 15px; " class="contacto" id="contBusqueda" >
                <tr>
                    <td><center><h4>RESULTADOS DE LA BUSQUEDA</h4></center>    
                <fieldset id="RSBus" style="margin-top:5px;">
                </fieldset>
                </td>
                </tr>
                <tr>
                    <td height="50" colspan="4" style="text-align: center;"><button type="button" name="btn1" id="boton1" value="ver"  class="boton" style="width: 150px;margin-left: 650px;" onclick="vernumero()">Ver ...</button></td>
                </tr>            
            </table>
        </form>
    </body>
</html>
